#ifndef SECTIONGRAPHCREATOR_H
#define SECTIONGRAPHCREATOR_H

#include <QObject>
#include "sm-global.h"

template <typename Type> class GraphNode;
class SectionInfo;

class AbstractDatabaseClient;

class SectionGraphCreator : public QObject
{
    Q_OBJECT
public:
    explicit SectionGraphCreator(QObject *parent = 0);

    GraphNode<SectionInfo>* createBeginningGraph();
    void createDatabaseGraph (GraphNode<SectionInfo>* rootNode, QSharedPointer<AbstractDatabaseClient> databaseClient);

private:
    GraphNode<SectionInfo>* createNode (SmGlobal::SectionType section,
                                        const QString &description,
                                        QSharedPointer<AbstractDatabaseClient> databaseClient,
                                        GraphNode<SectionInfo>* parentNode = 0);
};

#endif // SECTIONGRAPHCREATOR_H
